<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="title">
        TabView
    </ui:define>

    <ui:define name="description">
        TabView is a tabbed panel component.
    </ui:define>

    <ui:param name="documentationLink" value="/components/tabview" />

    <ui:define name="implementation">

        <h:form id="form">

            <p:growl id="msgs" showDetail="true" skipDetailIfEqualsSummary="true" />

            <h3 style="margin-top:0">Basic</h3>
            <p:tabView>
                <p:tab title="Godfather Part I">
                    <h:panelGrid columns="2" cellpadding="10">
                        <p:graphicImage name="demo/images/godfather/godfather1.jpg" />
                        <h:outputText
                            value="The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding.
                            His beloved son Michael has just come home from the war, but does not intend to become part of his father's business.
                            Through Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind and benevolent to those who give respect,
                            but given to ruthless violence whenever anything stands against the good of the family." />
                    </h:panelGrid>
                </p:tab>
                <p:tab title="Godfather Part II">
                    <h:panelGrid columns="2" cellpadding="10">
                        <p:graphicImage name="demo/images/godfather/godfather2.jpg" />
                        <h:outputText value="Francis Ford Coppola's legendary continuation and sequel to his landmark 1972 film, The_Godfather, parallels the young Vito Corleone's rise with his son Michael's spiritual fall, deepening The_Godfather's depiction of the dark side of the American dream.
                        In the early 1900s, the child Vito flees his Sicilian village for America after the local Mafia kills his family. Vito struggles to make a living, legally or illegally, for his wife and growing brood in Little Italy,
                        killing the local Black Hand Fanucci after he demands his customary cut of the tyro's business. With Fanucci gone, Vito's communal stature grows." />
                    </h:panelGrid>
                </p:tab>
                <p:tab title="Godfather Part III">
                    <h:panelGrid columns="2" cellpadding="10">
                        <p:graphicImage name="demo/images/godfather/godfather3.jpg" />
                        <h:outputText value="After a break of more than 15 years, director Francis Ford Coppola and writer Mario Puzo returned to the well for this third and final story of the fictional Corleone crime family.
                            Two decades have passed, and crime kingpin Michael Corleone, now divorced from his wife Kay has nearly succeeded in keeping his promise that his family would one day be completely legitimate." />
                    </h:panelGrid>
                </p:tab>
            </p:tabView>

            <h3>On-Demand Loading</h3>
            <p:tabView dynamic="true" cache="true" effect="fold">
                <p:tab title="Godfather Part I">
                    <h:panelGrid columns="2" cellpadding="10">
                        <p:graphicImage name="demo/images/godfather/godfather1.jpg" />
                        <h:outputText
                            value="The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding.
                            His beloved son Michael has just come home from the war, but does not intend to become part of his father's business.
                            Through Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind and benevolent to those who give respect,
                            but given to ruthless violence whenever anything stands against the good of the family." />
                    </h:panelGrid>
                </p:tab>
                <p:tab title="Godfather Part II">
                    <h:panelGrid columns="2" cellpadding="10">
                        <p:graphicImage name="demo/images/godfather/godfather2.jpg" />
                        <h:outputText value="Francis Ford Coppola's legendary continuation and sequel to his landmark 1972 film, The_Godfather, parallels the young Vito Corleone's rise with his son Michael's spiritual fall, deepening The_Godfather's depiction of the dark side of the American dream.
                        In the early 1900s, the child Vito flees his Sicilian village for America after the local Mafia kills his family. Vito struggles to make a living, legally or illegally, for his wife and growing brood in Little Italy,
                        killing the local Black Hand Fanucci after he demands his customary cut of the tyro's business. With Fanucci gone, Vito's communal stature grows." />
                    </h:panelGrid>
                </p:tab>
                <p:tab title="Godfather Part III">
                    <h:panelGrid columns="2" cellpadding="10">
                        <p:graphicImage name="demo/images/godfather/godfather3.jpg" />
                        <h:outputText value="After a break of more than 15 years, director Francis Ford Coppola and writer Mario Puzo returned to the well for this third and final story of the fictional Corleone crime family.
                            Two decades have passed, and crime kingpin Michael Corleone, now divorced from his wife Kay has nearly succeeded in keeping his promise that his family would one day be completely legitimate." />
                    </h:panelGrid>
                </p:tab>
            </p:tabView>

            <h3>Events</h3>
            <p:tabView>
                <p:ajax event="tabChange" listener="#{tabbedView.onTabChange}" update=":form:msgs"/>
                <p:ajax event="tabClose" listener="#{tabbedView.onTabClose}" update=":form:msgs"/>

                <p:tab title="Godfather Part I">
                    <h:panelGrid columns="2" cellpadding="10">
                        <p:graphicImage name="demo/images/godfather/godfather1.jpg" />
                        <h:outputText
                            value="The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding.
                            His beloved son Michael has just come home from the war, but does not intend to become part of his father's business.
                            Through Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind and benevolent to those who give respect,
                            but given to ruthless violence whenever anything stands against the good of the family." />
                    </h:panelGrid>
                </p:tab>
                <p:tab title="Godfather Part II" closable="true">
                    <h:panelGrid columns="2" cellpadding="10">
                        <p:graphicImage name="demo/images/godfather/godfather2.jpg" />
                        <h:outputText value="Francis Ford Coppola's legendary continuation and sequel to his landmark 1972 film, The_Godfather, parallels the young Vito Corleone's rise with his son Michael's spiritual fall, deepening The_Godfather's depiction of the dark side of the American dream.
                        In the early 1900s, the child Vito flees his Sicilian village for America after the local Mafia kills his family. Vito struggles to make a living, legally or illegally, for his wife and growing brood in Little Italy,
                        killing the local Black Hand Fanucci after he demands his customary cut of the tyro's business. With Fanucci gone, Vito's communal stature grows." />
                    </h:panelGrid>
                </p:tab>
                <p:tab title="Godfather Part III" closable="true">
                    <h:panelGrid columns="2" cellpadding="10">
                        <p:graphicImage name="demo/images/godfather/godfather3.jpg" />
                        <h:outputText value="After a break of more than 15 years, director Francis Ford Coppola and writer Mario Puzo returned to the well for this third and final story of the fictional Corleone crime family.
                            Two decades have passed, and crime kingpin Michael Corleone, now divorced from his wife Kay has nearly succeeded in keeping his promise that his family would one day be completely legitimate." />
                    </h:panelGrid>
                </p:tab>
            </p:tabView>

            <h3>DataModel</h3>
            <p:tabView value="#{tabbedView.cars}" var="car">
                <p:tab title="Car - #{car.id}">
                    <h:panelGrid columns="2" cellpadding="5">
                        <f:facet name="header">
                            <p:graphicImage name="demo/images/car/#{car.brand}-big.gif" />
                        </f:facet>
                        <h:outputText value="Brand:" style="font-weight: bold"/>
                        <h:outputText value="#{car.brand}" />

                        <h:outputText value="Year:" style="font-weight: bold"/>
                        <h:outputText value="#{car.year}" />

                        <h:outputText value="Color:" style="font-weight: bold"/>
                        <h:outputText value="#{car.color}" />
                    </h:panelGrid>
                </p:tab>
            </p:tabView>

            <h3>DataModel - Dynamic rendered Tabs</h3>
            <p:tabView value="#{tabbedView.cars}" var="car">
                <p:tab title="Car - #{car.id}" rendered="#{car.brand eq 'BMW'}">
                    <h:panelGrid columns="2" cellpadding="5">
                        <f:facet name="header">
                            <p:graphicImage name="demo/images/car/#{car.brand}-big.gif" />
                        </f:facet>
                        <h:outputText value="Brand:" style="font-weight: bold"/>
                        <h:outputText value="#{car.brand}" />

                        <h:outputText value="Year:" style="font-weight: bold"/>
                        <h:outputText value="#{car.year}" />

                        <h:outputText value="Color:" style="font-weight: bold"/>
                        <h:outputText value="#{car.color}" />
                    </h:panelGrid>
                </p:tab>
            </p:tabView>

            <h3>Scrollable</h3>
            <p:tabView scrollable="true">
                <p:tab title="Tab 1">Tab 1 Content</p:tab>
                <p:tab title="Tab 2">Tab 2 Content</p:tab>
                <p:tab title="Tab 3">Tab 3 Content</p:tab>
                <p:tab title="Tab 4">Tab 4 Content</p:tab>
                <p:tab title="Tab 5">Tab 5 Content</p:tab>
                <p:tab title="Tab 6">Tab 6 Content</p:tab>
                <p:tab title="Tab 7">Tab 7 Content</p:tab>
                <p:tab title="Tab 8">Tab 8 Content</p:tab>
                <p:tab title="Tab 9">Tab 9 Content</p:tab>
                <p:tab title="Tab 10">Tab 10 Content</p:tab>
                <p:tab title="Tab 11">Tab 11 Content</p:tab>
                <p:tab title="Tab 12">Tab 12 Content</p:tab>
                <p:tab title="Tab 13">Tab 13 Content</p:tab>
                <p:tab title="Tab 14">Tab 14 Content</p:tab>
                <p:tab title="Tab 15">Tab 15 Content</p:tab>
                <p:tab title="Tab 16">Tab 16 Content</p:tab>
                <p:tab title="Tab 17">Tab 17 Content</p:tab>
                <p:tab title="Tab 18">Tab 18 Content</p:tab>
                <p:tab title="Tab 19">Tab 19 Content</p:tab>
                <p:tab title="Tab 20">Tab 20 Content</p:tab>
                <p:tab title="Tab 21">Tab 21 Content</p:tab>
                <p:tab title="Tab 22">Tab 22 Content</p:tab>
                <p:tab title="Tab 23">Tab 23 Content</p:tab>
                <p:tab title="Tab 24">Tab 24 Content</p:tab>
                <p:tab title="Tab 25">Tab 25 Content</p:tab>
            </p:tabView>

            <h3>Orientation - Top|Bottom|Left|Right</h3>
            <p:tabView orientation="left">
                <p:tab title="Godfather Part I">
                    <h:panelGrid columns="2" cellpadding="10">
                        <p:graphicImage name="demo/images/godfather/godfather1.jpg" />
                        <h:outputText
                            value="The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding.
                            His beloved son Michael has just come home from the war, but does not intend to become part of his father's business.
                            Through Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind and benevolent to those who give respect,
                            but given to ruthless violence whenever anything stands against the good of the family." />
                    </h:panelGrid>
                </p:tab>
                <p:tab title="Godfather Part II">
                    <h:panelGrid columns="2" cellpadding="10">
                        <p:graphicImage name="demo/images/godfather/godfather2.jpg" />
                        <h:outputText value="Francis Ford Coppola's legendary continuation and sequel to his landmark 1972 film, The_Godfather, parallels the young Vito Corleone's rise with his son Michael's spiritual fall, deepening The_Godfather's depiction of the dark side of the American dream.
                        In the early 1900s, the child Vito flees his Sicilian village for America after the local Mafia kills his family. Vito struggles to make a living, legally or illegally, for his wife and growing brood in Little Italy,
                        killing the local Black Hand Fanucci after he demands his customary cut of the tyro's business. With Fanucci gone, Vito's communal stature grows." />
                    </h:panelGrid>
                </p:tab>
                <p:tab title="Godfather Part III">
                    <h:panelGrid columns="2" cellpadding="10">
                        <p:graphicImage name="demo/images/godfather/godfather3.jpg" />
                        <h:outputText value="After a break of more than 15 years, director Francis Ford Coppola and writer Mario Puzo returned to the well for this third and final story of the fictional Corleone crime family.
                            Two decades have passed, and crime kingpin Michael Corleone, now divorced from his wife Kay has nearly succeeded in keeping his promise that his family would one day be completely legitimate." />
                    </h:panelGrid>
                </p:tab>
            </p:tabView>

            <h3>Actions Facet</h3>
            <p:tabView>
                <p:tab title="Godfather Part I">
                    <f:facet name="actions">
                        <p:menuButton value="Options">
                            <p:menuitem value="Save" icon="pi pi-save"/>
                            <p:menuitem value="Update" icon="pi pi-refresh"/>
                            <p:menuitem value="Delete" ajax="false" icon="pi pi-times"/>
                            <p:separator />
                            <p:menuitem value="Homepage" url="http://www.primefaces.org" icon="pi pi-home"/>
                        </p:menuButton>

                        <p:menuButton value="Settings">
                            <p:menuitem value="Toggle" url="#" icon="pi pi-clone" />
                            <p:menuitem value="Remove" url="#" icon="pi pi-times" />
                        </p:menuButton>
                    </f:facet>

                    <h:panelGrid columns="2" cellpadding="10">
                        <p:graphicImage name="demo/images/godfather/godfather1.jpg" />
                        <h:outputText
                            value="The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding.
                            His beloved son Michael has just come home from the war, but does not intend to become part of his father's business.
                            Through Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind and benevolent to those who give respect,
                            but given to ruthless violence whenever anything stands against the good of the family." />
                    </h:panelGrid>
                </p:tab>
                <p:tab title="Godfather Part II">
                    <f:facet name="actions">
                        <p:button value="Process" />
                    </f:facet>

                    <h:panelGrid columns="2" cellpadding="10">
                        <p:graphicImage name="demo/images/godfather/godfather2.jpg" />
                        <h:outputText value="Francis Ford Coppola's legendary continuation and sequel to his landmark 1972 film, The_Godfather, parallels the young Vito Corleone's rise with his son Michael's spiritual fall, deepening The_Godfather's depiction of the dark side of the American dream.
                        In the early 1900s, the child Vito flees his Sicilian village for America after the local Mafia kills his family. Vito struggles to make a living, legally or illegally, for his wife and growing brood in Little Italy,
                        killing the local Black Hand Fanucci after he demands his customary cut of the tyro's business. With Fanucci gone, Vito's communal stature grows." />
                    </h:panelGrid>
                </p:tab>
                <p:tab title="Godfather Part III">
                    <h:panelGrid columns="2" cellpadding="10">
                        <p:graphicImage name="demo/images/godfather/godfather3.jpg" />
                        <h:outputText value="After a break of more than 15 years, director Francis Ford Coppola and writer Mario Puzo returned to the well for this third and final story of the fictional Corleone crime family.
                            Two decades have passed, and crime kingpin Michael Corleone, now divorced from his wife Kay has nearly succeeded in keeping his promise that his family would one day be completely legitimate." />
                    </h:panelGrid>
                </p:tab>
            </p:tabView>
        </h:form>

    </ui:define>

</ui:composition>